﻿<Window x:Class="WikiUploader.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Classes="clr-namespace:WikiUploader.Classes"
        xmlns:dock="clr-namespace:Monti.Docking;assembly=Monti"
        Closing="WindowClosing"
        Title="MainWindow" Height="768" Width="1024">
   
   <Window.DataContext>
      <Classes:MainViewModel />
   </Window.DataContext>
   
   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="*" />
      </Grid.RowDefinitions>

      <Grid Grid.Row="0"
            Margin="10, 5, 10, 5">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="200px" />
            <ColumnDefinition Width="25px" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="100px" />
            <ColumnDefinition Width="25px" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="100px" />
            <ColumnDefinition Width="25px" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
         </Grid.ColumnDefinitions>

         <TextBlock Text="Site: "
                    VerticalAlignment="Center"
                    Grid.Column="0" />
         <TextBox Grid.Column="1"
                  Text="{Binding Path=WikiSite, UpdateSourceTrigger=PropertyChanged}" />

         <TextBlock Text="User Name: "
                    VerticalAlignment="Center"
                    Grid.Column="3" />
         <TextBox Grid.Column="4"
                  Text="{Binding Path=UserName, UpdateSourceTrigger=PropertyChanged}" />

         <TextBlock Text="Password: "
                    VerticalAlignment="Center"
                    Grid.Column="6" />
         <PasswordBox Grid.Column="7"
                      x:Name="_Password" />
         
         <Button Content="Login to Wiki"
                 Grid.Column="9"
                 Command="{Binding Path=LoginToWikiCommand}"/>
      </Grid>

      <Grid Grid.Row="1"
            Margin="10, 5, 10, 5">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="200px" />
            <ColumnDefinition Width="10px" />
            <ColumnDefinition Width="50px" />
            <ColumnDefinition Width="10px" />
            <ColumnDefinition Width="50px" />
            <ColumnDefinition Width="10px" />
            <ColumnDefinition Width="50px" />
         </Grid.ColumnDefinitions>

         <TextBlock Text="Open page: "
                    VerticalAlignment="Center"
                    Grid.Column="0" />
         <TextBox Grid.Column="1"
                  Text="{Binding Path=PageToOpen, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
         
         <Button Grid.Column="3"
                 Content="Edit"
                 Command="{Binding Path=EditPageCommand}" />
         
         <Button Grid.Column="5"
                 Content="View" />
         
         <Button Grid.Column="7"
                 Content="Search" />
      </Grid>

      <dock:DockManager Grid.Row="2"
                        IsEnabled="{Binding Path=IsSiteConnected}"
                        ActiveDockGroup="{Binding Path=ActiveDockGroup, Mode=TwoWay}"
                        ActiveContent="{Binding Path=ActiveContent, Mode=TwoWay}"
                        MainDockGroup="{Binding Path=DockContent}" />
   </Grid>
</Window>
